package com.zty.product.service.Impl;

import com.zty.product.dataobject.ProductInfo;
import com.zty.product.enums.ProductInfoStatusEnum;
import com.zty.product.repository.ProductInfoRepository;
import com.zty.product.service.ProductInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class ProductInfoServiceImpl implements ProductInfoService {

    @Autowired
    private ProductInfoRepository productInfoRepository;

    @Override
    public List<ProductInfo> findUpAll() {
        return  productInfoRepository.findByProductStatus(ProductInfoStatusEnum.UP.getCode());

    }
}
